<!--  -->
<template>
  <div class='signupinfo'>
    <!-- <Header-Comp title="签约信息" /> -->
    <h3>费率</h3>
    <van-cell v-for="( item,index) in data.mrcAccountRates"
              :title="item.rateName"
              :key="index">
      <template #right-icon>
        {{parseFloat(item.rateValue).toFixed(2)}}{{Number(item.rateType) == 4?'元': '%'}}
      </template>
    </van-cell>

    <h3>签约信息</h3>
    <van-cell class="cell-txt"
              title="《账号注册及服务协议》"
              @click="onregister" />
    <van-cell class="cell-txt"
              :to="{path:'/capage',query:{deptId:$route.query.deptId || '1123598813738675201'}}"
              title="《合作协议》" />
    <van-cell class="cell-txt"
              :to="{path:'/purchaseAgreement',query:{deptId:$route.query.deptId || '1123598813738675201'}}"
              title="《购机协议》" />
    <van-cell class="cell-txt"
              :to="{path:'/privacy',query:{deptId:$route.query.deptId || '1123598813738675201'}}"
              title="《隐私政策协议》" />
  </div>
</template>

<script>
import { mrctype } from "@/api/mreinfo";

export default {
  components: {
    HeaderComp: () => import('@/components/HeaderComp')
  },
  data () {
    //这里存放数据
    return {
      data: {},
      rateList: []
    };
  },
  created () {
    // if (this.$route.query.token) {
    //   localStorage.setItem('fuhuibatoken', this.$route.query.token)
    // }
    mrctype('mrc_rate').then(rate => {
      this.rateList = rate.data
    })
    var data = {
      id: this.$route.query.id,
      type: this.$route.query.type
    }
    this.$store
      .dispatch("Getmrcdetail", data).then(res => {
        this.data = res
        this.data.mrcAccountRates.map(v => {
          this.rateList.map(r => {
            if (r.dictKey == v.rateType) {
              v.rateName = r.dictValue
            }
          })
        })
      })
  },
  methods: {
    onregister () {
      this.$router.push({ path: '/protocol', query: { id: 21, deptId: this.$route.query.deptId } });
    }
  }

}
</script>
<style lang='less' scoped>
.signupinfo {
  height: 100%;
  background: #f9f9f9;
  border-top: 1px solid #d7d7d7;
  h3 {
    height: 90px;
    line-height: 90px;
    font-size: 28px;
    font-family: PingFang SC;
    font-weight: 500;
    color: #131313;
    padding-left: 30px;
  }
  /deep/ .van-cell__title {
    // font-size: 32px;
    color: #131313;
  }
  /deep/ .van-cell__value {
    // font-size: 32px;
    color: #3d3d3d;
  }
  .cell-txt /deep/ .van-cell__title {
    color: #ffb72f !important;
  }
}
</style>